<?php
if (!defined('BASEPATH'))
    exit('No direct script access allowed');

$this->load->helper('html');
?>



<!-- JavaScript -->
<script type="text/javascript" src="<?= base_url() ?>js/wufoo.js"></script>

<!-- CSS -->
<link rel="stylesheet" type="text/css" href="<?= base_url() ?>css/form/form.css" media="screen, tv, projection" title="Default" />


<div id="container">
    <fieldset class="fieldset">
        <legend class="legend">

		| Form Penilaian |</legend>

        <div id="contentform" style="border:solid thin #BBBBBB; height:350px; background-color:#F9F9F9; -moz-border-radius: 5px;  padding-top:10px; padding-bottom:0.3px; margin-right:100px; margin-left:100px;">

            <!-- Start value -->
            <?
            //Setting Value Jika Prosedur yang dilakukan adalah prosedur input biasa.
            $value = array(
                'id_kelas' => "",
                'nama_kelas' => "",
                'jadwal_kelas' => "",
                'ruang_kelas' => "",
                'nilai' => "",
                'act_form' => "kelas_santri/save_nilai"
            );

            //Setting Value pada form Jika melakukan prosedur Edit terhadap data tertentu.
            if ($status == "edit") {
                $value['id_kelas'] = $id_kelas;
                $value['nama_kelas'] = $nama_kelas;
                $value['jadwal_kelas'] = $jadwal_kelas;
                $value['ruang_kelas'] = $ruang_kelas;
                $value['id_ustad'] = $id_ustad;
                $value['act_form'] = "" . $value['id_kelas'];
            }//end if
            ?>
            <?= form_open_multipart($value["act_form"]); ?>
            <!-- End value -->

            <table width="847" border="0" bordercolor="#F0F0F0">
                <tr>
                    <td width="905" height="150">
                        <form id="form1" name="form1" method="post">
                            <div align="left">
                                <table border="1" cellspacing="0">
                                    <tr align="center">
                                        <td width="50">No.</td>
                                        <td width="100">No Induk</td>
                                        <td width="200">Nama Santri</td>
                                        <td width="10">Nilai Teori</td>
                                        <td width="10">Nilai Praktek</td>
                                    </tr>
									<?
									$no = 1;
									foreach ($data_form_nilai->result() as $row)
									{
										echo'
											<tr>
												<td align="center">'.$no.'</td>
												<td align="center">'.$row->munakosah.'</td>
												<td>'.$row->nama_santri.'</td>
												<td><input name="teori_'.$row->id_santri.'" type="text" size="5" value="'.$row->nilai.'"/></td>
												<td><input name="praktek_'.$row->id_santri.'" type="text" size="5" value="'.$row->nilai_praktek.'"/></td>
											</tr>
										';
										$no++;
									}
									?>
                                </table>
                            </div>
                            <!-- Start Button -->
                            <div align="left">
								<input type="submit" name="Submit" value="Simpan" />
								<a href="<?php echo site_url('kelas_santri/index/'.$row->id_kelas) ?>">
								<input type="button" value="Kembali" />
								</a>

							</div>
                        </form>        
                        <p align="center">&nbsp;</p></td></tr>
            </table>
        </div>
        <p>&nbsp;</p>
    </fieldset>
</div> 
<p>
    <!--container-->
</p>
<p>&nbsp; </p>
